package com.springcloud.configclient.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:MuJiuTian
 * @Description: config-client模块启动，测试获取config-server从Git那里获取的配置属性
 * @Date: Created in 上午10:40 2019/11/29
 */
@RestController
@RefreshScope
public class TestController {

    @Value("${osc.name}")
    private String name;

    @GetMapping(value = "/test1.html")
    public String test1(){
        return name;
    }
}
